export const constantRoute = [
    {
        path:'/',
        component:()=>import('@/layout/index.vue'),
        name:'layout',
        redirect:'/home',
        children:[
            {
                path:'/home',
                component:()=>import('@/views/home/index.vue'),
                name:'home',
                meta:{
                    title:'首页',
                    icon:'HomeFilled'
                }
            }
        ]
    },
    {
        path:'/screen',
        component:()=>import('@/views/screen/index.vue'),
        name:'screen',
        meta:{
            title:'数据大屏',
            icon:'DataBoard'
        }
    },
    {
        path:'/login',
        component:()=>import('@/views/login/index.vue'),
        name:'login',
        meta:{
            title:'登录',
            notMenu:true
        }
    },
    {
        path:'/404',
        component:()=>import('@/views/404/index.vue'),
        name:'404',
        meta:{
            title:'404',
            notMenu:true
        }
    }
]

export const asyncRoute = [
    {
        path:'/premission',
        component:()=>import('@/layout/index.vue'),
        name:'Acl',
        meta:{
            title:'权限管理',
            icon:'Lock'
        },
        redirect:'/premission/user',
        children:[
            {
                path:'/premission/user',
                component:()=>import('@/views/premission/user.vue'),
                name:'User',
                meta:{
                    title:'用户管理',
                    icon:'User'
                }
            },
            {
                path:'/premission/role',
                component:()=>import('@/views/premission/role.vue'),
                name:'Role',
                meta:{
                    title:'角色管理',
                    icon:'UserFilled'
                }
            },
            {
                path:'/premission/menu',
                component:()=>import('@/views/premission/menu.vue'),
                name:'Permission',
                meta:{
                    title:'菜单管理',
                    icon:'Menu'
                }
            }
        ]
    },
    {
        path:'/goods',
        component:()=>import('@/layout/index.vue'),
        name:'Product',
        meta:{
            title:'商品管理',
            icon:'Shop'
        },
        redirect:'/goods/brand',
        children:[
            {
                path:'/goods/brand',
                component:()=>import('@/views/goods/brand.vue'),
                name:'Trademark',
                meta:{
                    title:'品牌管理',
                    icon:'ShoppingTrolley'
                }
            },
            {
                path:'/goods/property',
                component:()=>import('@/views/goods/property.vue'),
                name:'Attr',
                meta:{
                    title:'属性管理',
                    icon:'Avatar'
                }
            },
            {
                path:'/goods/spu',
                component:()=>import('@/views/goods/spu.vue'),
                name:'Spu',
                meta:{
                    title:'SPU管理',
                    icon:'Menu'
                }
            },
            {
                path:'/goods/sku',
                component:()=>import('@/views/goods/sku.vue'),
                name:'Sku',
                meta:{
                    title:'SKU管理',
                    icon:'Menu'
                }
            }
        ]
    }
]

export const anyRoute = [
    {
        path:'/:pathMatch(.*)*',
        redirect:'/404',
        name:'any',
        meta:{
            notMenu:true
        }
    }
]